package com.kx.yooli.kx.wechat.utils.log;

import com.alibaba.fastjson2.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author john_sqwen-childe.wen
 * date 2024/4/8
 * PROJECT_NAME wechat
 * description create BusinessLog by john_sqwen
 * and  value is
 */
public class BusinessLog extends LogBean{
    private final Logger log = LoggerFactory.getLogger(BusinessLog.class);
    private static final String LABEL = "business";

    private BusinessLog(String userName, String fullName, Object userId, String ip, String url, Object params) {
        super(userName, fullName, userId, ip, url, params);
        this.setLabel("business");
    }

    public static BusinessLog create(String userName, String fullName, Object userId, String ip, String url, Object params) {
        return new BusinessLog(userName, fullName, userId, ip, url, params);
    }

    public static BusinessLog create(String userName, String ip, String url, Object params) {
        return new BusinessLog(userName, (String)null, (Object)null, ip, url, params);
    }

    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
